package com.controller.zk;

import com.alibaba.fastjson2.JSON;
import com.bean.zk.Household;
import com.service.zk.HouseholdService;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;
import java.util.List;

@Controller
public class HouseholdController {

    @Resource
    private HouseholdService householdService;

//    返回所有住户
    @RequestMapping("/Fxypage/gethouseholds")
    @ResponseBody
    public List<Household> dogetHouseholds(){
        return householdService.getHouseholds();
    }


//    更新住户信息
    @PostMapping("/Fxypage/selhousehold")
    @ResponseBody
    public List<Household> doselhousehold(@RequestBody Household household){

        return householdService.selHousehold(household);
    }



}
